package com.heima.behavior.controller.v1;

import com.heima.behavior.service.UnLikeBehaviorServcie;
import com.heima.model.behavior.dtos.UnLikesBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户行为 :不喜欢 controller
 */
@Slf4j
@RestController
@RequestMapping("/api/v1")
public class UnLikeBehaviorController {
@Autowired
private UnLikeBehaviorServcie unLikeBehaviorServcie;

    @PostMapping("/un_likes_behavior")
    public ResponseResult handlerUnLikesBehavior(@RequestBody UnLikesBehaviorDto dto){
        log.info("用户行为-不喜欢:{}",dto);
        //调用service

        return unLikeBehaviorServcie.handlerUnLikesBehavior(dto);
    }
}
